EC-CUBE 2.11.4
[ class tree: EC-CUBE 2.11.4 ] [ index: EC-CUBE 2.11.4 ] [ all elements ]

Class: SC_CartSession

Source Location: /SC_CartSession.php

Class Overview


カートセッション管理クラス


Author(s):

  • LOCKON CO.,LTD.

Version:

  • $Id: SC_CartSession.php 21296 2011-10-22 14:44:09Z Seasoft $

Variables

Methods



Class Details

[line 30]
カートセッション管理クラス



Tags:

author:  LOCKON CO.,LTD.
version:  $Id: SC_CartSession.php 21296 2011-10-22 14:44:09Z Seasoft $


[ Top ]


Class Variables

$cartSession =

[line 35]

カートのセッション変数.


Type:   mixed


[ Top ]

$key_tmp =

[line 32]

ユニークIDを指定する.


Type:   mixed


[ Top ]



Class Methods


constructor SC_CartSession [line 38]

SC_CartSession SC_CartSession( [ $cartKey = 'cart'])



Parameters:

   $cartKey  

[ Top ]

method addProduct [line 229]

void addProduct( $product_class_id, $quantity)



Parameters:

   $product_class_id  
   $quantity  

[ Top ]

method adjustSessionProductsClass [line 300]

void adjustSessionProductsClass( &$arrProductsClass)

セッション中の商品情報データの調整。

productsClass項目から、不必要な項目を削除する。




Parameters:

   &$arrProductsClass  

[ Top ]

method calculate [line 619]

array calculate( integer $productTypeId, &$objCustomer, [integer $use_point = 0], [integer|array $deliv_pref = ""], [integer $charge = 0], [integer $discount = 0], [integer $deliv_id = 0], SC_Customer $objCustomer)

カートの内容を計算する.

カートの内容を計算し, 下記のキーを保持する連想配列を返す.

  • tax: 税額
  • subtotal: カート内商品の小計
  • deliv_fee: カート内商品の合計送料
  • total: 合計金額
  • payment_total: お支払い合計
  • add_point: 加算ポイント




Tags:

return:  カートの計算結果の配列


Parameters:

integer   $productTypeId   商品種別ID
SC_Customer   $objCustomer   ログイン中の SC_Customer インスタンス
integer   $use_point   今回使用ポイント
integer|array   $deliv_pref   配送先都道府県ID.
integer   $charge   手数料
integer   $discount   値引
integer   $deliv_id   配送業者ID
   &$objCustomer  

[ Top ]

method checkChangeCart [line 69]

void checkChangeCart( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method checkProducts [line 518]

string checkProducts( $productTypeId, string $key)

カート内の商品の妥当性をチェックする.

エラーが発生した場合は, 商品をカート内から削除又は数量を調整し, エラーメッセージを返す.

  1. 商品種別に関連づけられた配送業者の存在チェック
  2. 削除/非表示商品のチェック
  3. 商品購入制限数のチェック
  4. 在庫数チェック




Tags:

return:  エラーが発生した場合はエラーメッセージ


Parameters:

string   $key   商品種別ID
   $productTypeId  

[ Top ]

method delAllProducts [line 423]

void delAllProducts( integer $productTypeId)

商品種別ID を指定して, カート内の商品をすべて削除する.



Parameters:

integer   $productTypeId   商品種別ID

[ Top ]

method delProduct [line 431]

void delProduct( $cart_no, $productTypeId)



Parameters:

   $cart_no  
   $productTypeId  

[ Top ]

method delProductKey [line 279]

void delProductKey( $keyname, $val, $productTypeId)



Parameters:

   $keyname  
   $val  
   $productTypeId  

[ Top ]

method downQuantity [line 449]

void downQuantity( $cart_no, $productTypeId)



Parameters:

   $cart_no  
   $productTypeId  

[ Top ]

method getAllCartList [line 372]

array getAllCartList( )

すべてのカートの内容を取得する.



Tags:

return:  すべてのカートの内容


[ Top ]

method getAllProductClassID [line 407]

array getAllProductClassID( integer $productTypeId)

カート内にある商品規格IDを全て取得する.



Tags:

return:  商品規格ID の配列


Parameters:

integer   $productTypeId   商品種別ID

[ Top ]

method getAllProductID [line 391]

void getAllProductID( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getAllProductsPoint [line 204]

void getAllProductsPoint( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getAllProductsTax [line 190]

void getAllProductsTax( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getAllProductsTotal [line 166]

void getAllProductsTotal( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getCancelPurchase [line 61]

void getCancelPurchase( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getCartList [line 333]

array getCartList( integer $productTypeId)

商品種別ごとにカート内商品の一覧を取得する.



Tags:

return:  カート内商品一覧の配列


Parameters:

integer   $productTypeId   商品種別ID

[ Top ]

method getKey [line 716]

integer getKey( )

カートに設定された現在のキー(商品種別ID)を取得する.



Tags:

return:  商品種別ID


[ Top ]

method getKeys [line 680]

array getKeys( )

カートが保持するキー(商品種別ID)を配列で返す.



Tags:

return:  商品種別IDの配列


[ Top ]

method getMax [line 141]

void getMax( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getNextCartID [line 97]

void getNextCartID( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getPrevURL [line 274]

void getPrevURL( )



[ Top ]

method getProductClassId [line 496]

integer getProductClassId( integer $cart_no, integer $productTypeId)

カート番号と商品種別IDを指定して, 商品規格IDを取得する.



Tags:

return:  商品規格ID


Parameters:

integer   $cart_no   カート番号
integer   $productTypeId   商品種別ID

[ Top ]

method getProductTotal [line 112]

string getProductTotal( integer $id, $productTypeId)

商品ごとの合計価格 XXX 実際には、「商品」ではなく、「カートの明細行(≒商品規格)」のような気がします。



Tags:

return:  商品ごとの合計価格(税込み)
deprecated:  SC_CartSession::getCartList() を使用してください


Parameters:

integer   $id  
   $productTypeId  

[ Top ]

method getQuantity [line 463]

integer getQuantity( integer $cart_no, integer $productTypeId)

カート番号と商品種別IDを指定して, 数量を取得する.



Tags:

return:  該当商品規格の数量


Parameters:

integer   $cart_no   カート番号
integer   $productTypeId   商品種別ID

[ Top ]

method getTotalQuantity [line 156]

void getTotalQuantity( $productTypeId)



Parameters:

   $productTypeId  

[ Top ]

method getValue [line 292]

void getValue( $key, $productTypeId)



Parameters:

   $key  
   $productTypeId  

[ Top ]

method hasProductType [line 735]

boolean hasProductType( integer $product_type_id)

引数の商品種別の商品がカートに含まれるかどうか.



Tags:

return:  指定の商品種別がカートに含まれる場合 true


Parameters:

integer   $product_type_id   商品種別ID

[ Top ]

method isDelivFree [line 570]

boolean isDelivFree( integer $productTypeId)

送料無料条件を満たすかどうかチェックする



Tags:

return:  送料無料の場合 true


Parameters:

integer   $productTypeId   商品種別ID

[ Top ]

method isMultiple [line 725]

boolean isMultiple( )

複数配送扱いかどうか.



Tags:

return:  カートが複数配送扱いの場合 true


[ Top ]

method registerKey [line 698]

void registerKey( integer $key)

カートに設定された現在のキー(商品種別ID)を登録する.



Parameters:

integer   $key   商品種別ID

[ Top ]

method saveCurrentCart [line 46]

void saveCurrentCart( $key_tmp, $productTypeId)



Parameters:

   $key_tmp  
   $productTypeId  

[ Top ]

method setPrevURL [line 253]

void setPrevURL( $url, [ $excludePaths = array()])



Parameters:

   $url  
   $excludePaths  

[ Top ]

method setProductValue [line 130]

void setProductValue( $id, $key, $val, $productTypeId)



Parameters:

   $id  
   $key  
   $val  
   $productTypeId  

[ Top ]

method setQuantity [line 480]

void setQuantity( integer $quantity, integer $cart_no, integer $productTypeId)

カート番号と商品種別IDを指定して, 数量を設定する.



Parameters:

integer   $quantity   設定する数量
integer   $cart_no   カート番号
integer   $productTypeId   商品種別ID

[ Top ]

method setValue [line 288]

void setValue( $key, $val, $productTypeId)



Parameters:

   $key  
   $val  
   $productTypeId  

[ Top ]

method unsetKey [line 707]

void unsetKey( )

カートに設定された現在のキー(商品種別ID)を削除する.



[ Top ]

method upQuantity [line 441]

void upQuantity( $cart_no, $productTypeId)



Parameters:

   $cart_no  
   $productTypeId  

[ Top ]


Documentation generated on Fri, 24 Feb 2012 14:02:25 +0900 by Seasoft